Update for cairo-xlib API change.
authorOwen Taylor <otaylor@redhat.com>
Sat, 14 May 2005 01:04:15 +0000 (01:04 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Sat, 14 May 2005 01:04:15 +0000 (01:04 +0000)
2005-05-13  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c: Update for cairo-xlib API change.

        * gdk/x11/gdkpixmap-x11.[ch] gdk/gdk.symbols: Export
        gdk_pixmap_impl_x11_get_type(), needed in gdkdrawable-x11.c.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gdk/gdk.symbols
gdk/x11/gdkdrawable-x11.c
gdk/x11/gdkpixmap-x11.c
gdk/x11/gdkpixmap-x11.h

index 6854dc7bd91d949a496d89160d80da1ecd490dfe..f377a7a21f569a7f900e1845652106cc9b72fc6e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-05-13  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkdrawable-x11.c: Update for cairo-xlib API change.
+
+       * gdk/x11/gdkpixmap-x11.[ch] gdk/gdk.symbols: Export 
+       gdk_pixmap_impl_x11_get_type(), needed in gdkdrawable-x11.c.
+       
 2005-05-11  Owen Taylor  <otaylor@redhat.com>
 
        * tests/testgtk.c (on_alpha_window_expose): Fix to use
index 6854dc7bd91d949a496d89160d80da1ecd490dfe..f377a7a21f569a7f900e1845652106cc9b72fc6e 100644 (file)
@@ -1,3 +1,10 @@
+2005-05-13  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkdrawable-x11.c: Update for cairo-xlib API change.
+
+       * gdk/x11/gdkpixmap-x11.[ch] gdk/gdk.symbols: Export 
+       gdk_pixmap_impl_x11_get_type(), needed in gdkdrawable-x11.c.
+       
 2005-05-11  Owen Taylor  <otaylor@redhat.com>
 
        * tests/testgtk.c (on_alpha_window_expose): Fix to use
index 6854dc7bd91d949a496d89160d80da1ecd490dfe..f377a7a21f569a7f900e1845652106cc9b72fc6e 100644 (file)
@@ -1,3 +1,10 @@
+2005-05-13  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkdrawable-x11.c: Update for cairo-xlib API change.
+
+       * gdk/x11/gdkpixmap-x11.[ch] gdk/gdk.symbols: Export 
+       gdk_pixmap_impl_x11_get_type(), needed in gdkdrawable-x11.c.
+       
 2005-05-11  Owen Taylor  <otaylor@redhat.com>
 
        * tests/testgtk.c (on_alpha_window_expose): Fix to use
index 8e70365ba0febca4eaf4760fc590c4f34e3da626..96eaf740ac649d4f4dd8b0d2439a81701654dc94 100644 (file)
@@ -608,6 +608,14 @@ gdk_gc_get_screen
 #endif
 #endif
 
+#if IN_HEADER(__GDK_PIXMAP_X11_H__)
+#if IN_FILE(__GDK_PIXMAP_X11_C__)
+#ifdef GDK_PIXMAPING_X11
+gdk_pixmap_impl_x11_get_type G_GNUC_CONST
+#endif
+#endif
+#endif
+
 #if IN_HEADER(__GDK_WINDOW_X11_H__)
 #if IN_FILE(__GDK_WINDOW_X11_C__)
 #ifdef GDK_WINDOWING_X11
index 7922aaeee01770a77d569db5ccba53b821f115e8..a2cc3834842028e45932df43a5250605f42af3bd 100644 (file)
@@ -1453,18 +1453,14 @@ gdk_x11_ref_cairo_surface (GdkDrawable *drawable)
   
       visual = gdk_drawable_get_visual (drawable);
 
-      if (GDK_IS_WINDOW (drawable))
-       impl->cairo_surface = cairo_xlib_surface_create_for_window_with_visual (GDK_SCREEN_XDISPLAY (impl->screen),
-                                                                               impl->xid,
-                                                                               GDK_VISUAL_XVISUAL (visual));
-      else if (visual) 
-       impl->cairo_surface = cairo_xlib_surface_create_for_pixmap_with_visual (GDK_SCREEN_XDISPLAY (impl->screen),
-                                                                               impl->xid,
-                                                                               GDK_VISUAL_XVISUAL (visual));
+      if (visual) 
+       impl->cairo_surface = cairo_xlib_surface_create_with_visual (GDK_SCREEN_XDISPLAY (impl->screen),
+                                                                    impl->xid,
+                                                                    GDK_VISUAL_XVISUAL (visual));
       else if (gdk_drawable_get_depth (drawable) == 1)
-       impl->cairo_surface = cairo_xlib_surface_create_for_pixmap (GDK_SCREEN_XDISPLAY (impl->screen),
-                                                                   impl->xid,
-                                                                   CAIRO_FORMAT_A1);
+       impl->cairo_surface = cairo_xlib_surface_create (GDK_SCREEN_XDISPLAY (impl->screen),
+                                                        impl->xid,
+                                                        CAIRO_FORMAT_A1);
       else
        {
          g_warning ("Using Cairo rendering requires the drawable argument to\n"
@@ -1475,6 +1471,12 @@ gdk_x11_ref_cairo_surface (GdkDrawable *drawable)
          return NULL;
        }
 
+      if (GDK_IS_PIXMAP_IMPL_X11 (drawable))
+       {
+         GdkPixmapImplX11 *pix_impl = GDK_PIXMAP_IMPL_X11 (drawable);
+         cairo_xlib_surface_set_size (impl->cairo_surface, pix_impl->width, pix_impl->height);
+       }
+
       cairo_surface_set_user_data (impl->cairo_surface, &gdk_x11_cairo_key,
                                   drawable, gdk_x11_cairo_surface_destroy);
     }
index 501c4c3edd251db0124ab5d36452fefd317e925c..540d9ac30b69a28fea652f7f74c7d3bdd7008aab 100644 (file)
@@ -66,7 +66,7 @@ static void gdk_pixmap_impl_x11_finalize   (GObject            *object);
 
 static gpointer parent_class = NULL;
 
-static GType
+GType
 gdk_pixmap_impl_x11_get_type (void)
 {
   static GType object_type = 0;
index 9dc6727ffbd4d3621a9fa0083d4340d4dc5ccc11..b375c696cf11ca3ea1751c0e6fb7212899c2506f 100644 (file)
@@ -63,6 +63,8 @@ struct _GdkPixmapImplX11Class
 
 };
 
+GType gdk_pixmap_impl_x11_get_type (void);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */